<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			var year = parseInt(prompt("请输入一个年份"));
			var runyear = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
			for(var i = 1; i <= 12; i++) {
				if(i == 4 ||i == 6 || i == 9 || i == 11) {
					document.write(i + "月:30天<br />");
				} else if(i == 2) {
					if(runyear == year) {
						document.write(i + "月：29天");
					} else {
						document.write(i + "月:28天<br />");
					}
				} else {
					document.write(i + "月:31天<br />");
				}
			}
		</script>
	</body>

</html>